<template>
  <div class="home">
     <my-input v-model="msg"></my-input>
     <!-- <my-input :value="msg" @input="inputFtn"></my-input> -->
     <!-- @input="inputFtn" 相当于子传父 -->
     <!-- <input type="text" :value="msg" @input="inputFtn"> -->
     <div>{{msg}}</div>
  </div>
</template>
<script>
import MyInput from '../components/myInput'
export default {
  name: 'HomeView',
  components: {
    MyInput
  },
  data(){
    return {
      msg: '小明'
    }
  },
  methods: {
    inputFtn(e){
      this.msg = e.target.value;
    }
  },
}
</script>
